home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
closedir.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-01
|
608b
|
36 lines
/* closedir routine */
/* under MiNT (v0.9 or better) these use the appropriate system calls.
* under TOS or older versions of MiNT, they use Fsfirst/Fsnext
*
* Written by Eric R. Smith and placed in the public domain
*/
#include <stdlib.h>
#include <string.h>
#include <types.h>
#include <limits.h>
#include <dirent.h>
#include <errno.h>
#include <osbind.h>
#include <mintbind.h>
#include "lib.h"
extern int __mint;
extern ino_t __inode; /* in stat.c */
int
closedir(dirp)
DIR *dirp;
{
int r;
if (__mint > 8) {
r = (int)Dclosedir(dirp->handle);
} else {
r = 0;
}
free(dirp);
return r;
}